import request from '@/axios'
import type { AdvertItem } from '../types'

// c端获取激活的广告列表
export const getActiveAdvertList = (
  positionId: number
): Promise<{ code: number; message: string; data: AdvertItem[] }> => {
  return request.get({ url: '/advert/active/list', params: { positionId } }).then((res) => {
    return {
      code: res.code,
      message: res.message || '',
      data: res.data
    }
  })
}